import { useState } from "react";

export function useModal(title = '弹框标题') {
  const [open, setOpen] = useState(false);

  const closeModal = () => setOpen(false)
  const openModal = () => setOpen(true)


  return {
    open, 
    closeModal,
    openModal,
    title
  }
}